package mips;

public class Fact {
	
	public static void writeHanoiToMemory() {

		// 16 instructions starting at 0xA0000000
		// this is the assembled version of start.s
		n64.MemoryManager.RDRAM[0] = 0x27bdffe0;
		n64.MemoryManager.RDRAM[1] = 0xafbf0014;
		n64.MemoryManager.RDRAM[2] = 0xafbe0010;
		n64.MemoryManager.RDRAM[3] = 0x27be0002;
		n64.MemoryManager.RDRAM[4] = 0x24040000; // loads $a0 for getFibonacci($a0)
		n64.MemoryManager.RDRAM[5] = 0x0c000010;
		n64.MemoryManager.RDRAM[6] = 0x00000020;
		n64.MemoryManager.RDRAM[7] = 0x8fbf0014;
		n64.MemoryManager.RDRAM[8] = 0x8fbe0010;
		n64.MemoryManager.RDRAM[9] = 0x27bd0020;
		n64.MemoryManager.RDRAM[10] = 0x0800000a;
		n64.MemoryManager.RDRAM[11] = 0x00000020;
		n64.MemoryManager.RDRAM[12] = 0x00000020;
		n64.MemoryManager.RDRAM[13] = 0x00000020;
		n64.MemoryManager.RDRAM[14] = 0x00000020;
		n64.MemoryManager.RDRAM[15] = 0x00000020;
		
		//fact.s
		n64.MemoryManager.RDRAM[16] = 0x27bdffd8;
		n64.MemoryManager.RDRAM[17] = 0xafbf0024;
		n64.MemoryManager.RDRAM[18] = 0xafbe0020;
		n64.MemoryManager.RDRAM[19] = 0x03a0f020;
		n64.MemoryManager.RDRAM[20] = 0xafc40028;
		n64.MemoryManager.RDRAM[21] = 0x8fc30028;
		n64.MemoryManager.RDRAM[22] = 0x24020001;
		n64.MemoryManager.RDRAM[23] = 0x14620005;
		n64.MemoryManager.RDRAM[24] = 0x00000020;
		n64.MemoryManager.RDRAM[25] = 0x24020001;
		n64.MemoryManager.RDRAM[26] = 0xafc20018;
		n64.MemoryManager.RDRAM[27] = 0x10000010;
		n64.MemoryManager.RDRAM[28] = 0x00000020;
		n64.MemoryManager.RDRAM[29] = 0x8fc20028;
		n64.MemoryManager.RDRAM[30] = 0x00000020;
		n64.MemoryManager.RDRAM[31] = 0x2442ffff;
		n64.MemoryManager.RDRAM[32] = 0x00402020;
		n64.MemoryManager.RDRAM[33] = 0x3c19a000;
		n64.MemoryManager.RDRAM[34] = 0x27390040;
		n64.MemoryManager.RDRAM[35] = 0x00000020;
		n64.MemoryManager.RDRAM[36] = 0x0320f809;
		n64.MemoryManager.RDRAM[37] = 0x00000020;
		n64.MemoryManager.RDRAM[38] = 0x8fdc0010;
		n64.MemoryManager.RDRAM[39] = 0x00401820;
		n64.MemoryManager.RDRAM[40] = 0x8fc20028;
		n64.MemoryManager.RDRAM[41] = 0x00000020;
		n64.MemoryManager.RDRAM[42] = 0x00620018;
		n64.MemoryManager.RDRAM[43] = 0x00002012;
		n64.MemoryManager.RDRAM[44] = 0xafc40018;
		n64.MemoryManager.RDRAM[45] = 0x8fc20018;
		n64.MemoryManager.RDRAM[46] = 0x03c0e820;
		n64.MemoryManager.RDRAM[47] = 0x8fbf0024;
		n64.MemoryManager.RDRAM[48] = 0x8fbe0020;
		n64.MemoryManager.RDRAM[49] = 0x27bd0028;
		n64.MemoryManager.RDRAM[50] = 0x03e00008;
		n64.MemoryManager.RDRAM[51] = 0x00000020;

	}
}
